package com.think.teaching.mapper;

import com.think.teaching.model.PaperTag;
import com.think.teaching.model.Tag;

import java.util.List;

import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * <p>
 * 试卷标签 Mapper 接口
 * </p>
 *
 * @author think
 * @since 2020-08-12
 */
public interface PaperTagMapper extends BaseMapper<PaperTag> {
	@Select("SELECT tag.id,tag.tag,tag.type,tag.description FROM tag WHERE id IN(SELECT paper_tag.tag FROM paper_tag WHERE paper_id=#{id})")
	List<Tag> getPaperTagByPaperId(Integer id);
	
}
